The technology described herein relates to graphics processing systems, and in particular to the operation of graphics processing pipelines that perform multiview rendering in graphics processing systems.
Graphics processing is normally carried out by first splitting a scene (e.g. a 3-D model) to be displayed into a number of similar basic components or “primitives”, which primitives are then subjected to the desired graphics processing operations. Each primitive is usually defined by and represented as a set of vertices, where each vertex typically has associated with it a set of “attributes”, i.e. a set of data values for the vertex. These attributes will typically include position data and other, non-position data (varyings), e.g. defining colour, light, normal, texture coordinates, etc, for the vertex in question.
Once primitives and their vertices have been generated and defined, they can be processed by the graphics processing system, in order to generate the desired graphics processing output (render target), such as a frame for display. This typically involves performing an initial so-called “vertex shading” operation on the attributes of the vertices defined for the given graphics processing output (e.g. draw call), before the primitives are rasterised and rendered. This “vertex shading” operation operates to transform the attributes for each vertex into a desired form for the subsequent graphics processing operations.
A graphics processing pipeline will typically therefore include a vertex shading stage (a vertex shader) that executes vertex shading computations on the initial vertex attribute data (i.e. vertex attribute values) defined for the vertices so as to generate a desired set of output vertex attribute data (i.e. appropriately “shaded” attribute values) for use in subsequent processing stages of the graphics processing pipeline.
A vertex shading operation typically performs graphics processing by running small programs for each work item in each output to be generated, such as each render target, e.g. frame (a “work item” in this regard is usually a vertex). Typically, the output to be generated will be divided into smaller units of processing, referred to as “draw calls”, where each draw call will have a respective set of work items (vertices) defined for it and a set of primitives that use those work items (vertices).
In a vertex shading operation, each work item will typically be processed by means of an execution thread which will execute the first vertex shading operation for the work item in question. Modern graphics processing units (graphics processors) accordingly typically comprise programmable processing circuitry, e.g. in the form of one or more programmable execution units, that can execute vertex shader programs to perform the vertex shading computations. A given vertex shader program to be executed by the programmable processing circuitry (execution unit) will comprise a sequence of instructions (an execution thread), and the programmable processing circuitry (execution unit) will execute the instructions in the sequence appropriately for each execution thread (and work item) that the first vertex shading operation is to be executed for.
A vertex shading operation (program) to be executed by a given vertex shading stage of a graphics processing pipeline will be provided by the application that requires the graphics processing using a high-level shader programming language, such as GLSL, HLSL, OpenCL, etc. The high-level shader program is then translated by the shader language compiler to binary code for the target graphics processing pipeline. This binary code will consist of “instructions” which are specified in the instruction set specification for the given target graphics processing pipeline.
It is becoming increasingly common for graphics processing systems to be required to perform so-called “multiview” rendering. In this case, plural different views of a given scene are rendered, e.g. from plural different viewpoints, so as to create a set of images of the scene, with each image, e.g., viewing the scene from a different viewpoint. An example of this is stereoscopic rendering in which two images of a scene, one corresponding to the scene as seen from the left eye, and one corresponding to the scene as seen from the right eye, are generated and then displayed appropriately so as to provide a three-dimensional effect when the images are viewed. It is also known to generate and provide more than two views of a scene, for example for a lenticular display (which can, for example, use four or more images offset from each other).
In such cases, the vertex shading stage of the graphics processing pipeline will typically perform vertex shading for all attributes (attribute values) defined for the vertices separately for each view. When it comes to generating the multiple views required, typically the image corresponding to each respective view is generated separately and then the images displayed appropriately to achieve the desired, e.g. 3D, effect.
The Applicants believe that there remains scope for improvements to the generation of multiple images corresponding to multiple different views of the same scene when performing multiview rendering in graphics processing systems.
Like reference numerals are used for like features throughout the drawings, where appropriate.